﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace IndoReputation.Models.BusinessObject
{
    public class Users : CommonEntity
    {
        /// <summary>
        /// Default Contructor
        /// </summary>
        public Users()
        { }

        [Required]
        public int ID
        {
            set;
            get;
        }

        [Required]
        public int OfficeID
        {
            set;
            get;
        }

        [Required(ErrorMessage = "Please type the Name")]
        [StringLength(256, ErrorMessage = "String may not be longer than 256 characters")]        
        public string LoginName
        {
            set;
            get;
        }

        [Required(ErrorMessage = "Please type the Password")]
        [StringLength(256, ErrorMessage = "String may not be longer than 256 characters")]
        public string Password
        {
            set;
            get;
        }

        [StringLength(256, ErrorMessage = "String may not be longer than 256 characters")]
        public string FullName
        {
            set;
            get;
        }

        [StringLength(256, ErrorMessage = "String may not be longer than 256 characters")]
        public string Telephone
        {
            set;
            get;
        }

        [Required(ErrorMessage = "Please type the MemoryWord")]
        [StringLength(256, ErrorMessage = "String may not be longer than 256 characters")]
        public string MemoryWord
        {
            set;
            get;
        }
        public DateTime? LastLogin
        {
            set;
            get;
        }
        public DateTime? CreateAt
        {
            set;
            get;
        }
        public int? CreateBy
        {
            set;
            get;
        }
        public DateTime? UpdateAt
        {
            set;
            get;
        }
        public int? UpdateBy
        {
            set;
            get;
        }
        public bool? IsEnable
        {
            set;
            get;
        }
        public bool? IsAdmin
        {
            set;
            get;
        }
    }

    public class UsersJoin : CommonEntity
    {
        public int ID { get; set; }
        public string LoginName { get; set; }
        public string FullName { get; set; }
        public string Telephone { get; set; }
        public string CountryName { get; set; }
        public string CityName { get; set; }
        public string OfficeName { get; set; }
        public DateTime CreateAt { get; set; }
        public bool IsEnable { get; set; }
        public bool IsAdmin { get; set; }
    }

    public class UserActive
    {
        public int ID { get; set; }
        [Display(Name = "Login Name")]
        public string LoginName { get; set; }
        [Display(Name = "Full Name")]
        public string FullName { get; set; }
        [Display(Name = "Status")]
        public bool IsEnable { get; set; }
        [Display(Name = "Administrator")]
        public bool IsAdmin { get; set; }
    }

    public class UsersCheck
    {
        public UsersCheck()
        {
            ID = 0;
            LoginName = string.Empty;
            FullName = string.Empty;
            OfficeName = string.Empty;
            IsCEO = false;
            IsEnable = false;
            Piority = 0;
        }
        public int ID { get; set; }
        [Display(Name = "Login Name")]
        public string LoginName { get; set; }
        [Display(Name = "Full Name")]
        public string FullName { get; set; }
        [Display(Name = "Office Name")]
        public string OfficeName { get; set; }
        [Display(Name = "Status")]
        public bool IsEnable { get; set; }
        [Display(Name = "Is CEO")]
        public bool IsCEO { get; set; }
        [Display(Name = "Piority")]
        public Int32 Piority { get; set; }
    }

    public class UsersExtend : Users
    {
        public int CityID { get; set; }
        public int CountryID { get; set; }
        public int RegionID { get; set; }
    }
}